package aom.ju.ss.view.user

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentPagerAdapter
import androidx.fragment.app.FragmentStatePagerAdapter
import aom.ju.ss.R
import aom.ju.ss.databinding.FollowersActivityBinding
import aom.ju.ss.view.base.BaseActivity

/**
 * 粉丝  关注
 */
class FollowersActivity : BaseActivity() {
    private lateinit var binding: FollowersActivityBinding
    private var lf = arrayListOf(FollowFragment.getMy(), FansFragment.getMy())
    private var ts = arrayListOf("关注", "粉丝")
    override fun init() {
        binding = viewBinding as FollowersActivityBinding

        binding.viewPager.adapter = object : FragmentPagerAdapter(supportFragmentManager, 1) {
            override fun getCount(): Int {
                return 2
            }

            override fun getItem(position: Int): Fragment {
                return lf[position]
            }

            override fun getPageTitle(position: Int): CharSequence? {
                return ts[position]
            }
        }
        binding.tabLayout.setupWithViewPager(binding.viewPager)


    }

    override val lay: Int = R.layout.followers_activity


}